let router = require('../router/Router');
let noticeService = require('../service/noticeService');
const { BusiError, SysError } = require('../exception/exception');


/**
 * uid, page
 */
router.post("/auth/notice/query", function (req, resp) {
    req.body.page = 1;
    noticeService.queryUserPage(req.uid, req.body.page).then(res => {
        if (res) {
            resp.send({code: 200, msg: "success", data: res});
        } else {
            resp.send({code: 500, msg: "查询失败"});
        }
    }).catch(e => {
        console.logw("err:", e);
        resp.send({code: 500, msg: e});
    });
});